﻿#region NeoPatterns
// 
// NeoPatterns framework is released under LGPLv3 license.
// See http://www.opensource.org/licenses/lgpl-3.0.html for more details.
// 
// Please visit http://neopatterns.wikidot.com for more information about NeoPatterns
// 
// Copyright (c) Pascal Craponne 2008
// 
#endregion

namespace NeoPatterns.Patterns.Adapter
{
    /// <summary>
    /// This adapter adapts a collection to a simple (as simple as possible) array adapter
    /// </summary>
    public interface IArrayAdapter
    {
        /// <summary>
        /// Gives number of elements present in list
        /// </summary>
        int Count { get; }

        /// <summary>
        /// Gets or sets entry in the wrapped array
        /// </summary>
        /// <param name="index"></param>
        /// <returns></returns>
        object this[int index] { get; set; }

        /// <summary>
        /// The wrapped array
        /// </summary>
        object Array { get; set; }
    }
}
